"use strict";

module.exports = app => {
  const { STRING, INTEGER, BOOLEAN } = app.Sequelize;

  const Teleplay = app.model.define(
    "teleplay",
    {
      id: { type: INTEGER, primaryKey: true, autoIncrement: true },
      name: STRING(100),
      classify: STRING(100),
      actors: STRING(300),
      pic: STRING(100),
      desc: STRING(500),
      word: STRING(40),
      score: STRING(6),
      directors: STRING(300),
      show: BOOLEAN,
    },
    {
      timestamps: true,
      createdAt: "created_at",
      updatedAt: "updated_at",
      freezeTableName: true,
    }
  );

  return Teleplay;
};
